package testing.seperator;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import seperator.NumberSeperator;
import seperator.PrepSeperator;
import words.NumberStat;
import words.Preposition;


public class PrepSeperatorTest {
	PrepSeperator seperator;
	Preposition prep;
	
	@Before
	public void setUp() throws Exception {
		this.seperator = new PrepSeperator();
		
	}
	
	@Test
	public void test1()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","since","the","big","area","."};
		seperator.setdata(data);
		seperator.seperate();
		prep = seperator.getPrep();
		int result = prep.getStringArray().length;
		assertEquals(result,1);
	}
	@Test
	public void test2()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","because","of","the","big","area","."};
		seperator.setdata(data);
		seperator.seperate();
		prep = seperator.getPrep();
		int result = prep.getStringArray().length;
		assertEquals(result,0);
	}
	@Test
	public void test3()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","since","because","of","the","big","area","."};
		seperator.setdata(data);
		seperator.seperate();
		prep = seperator.getPrep();
		int result = prep.getStringArray().length;
		assertEquals(result,1);
	}
	@Test
	public void test4()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","behindeded","cause","of","the","big","area","."};
		seperator.setdata(data);
		seperator.seperate();
		prep = seperator.getPrep();
		int result = prep.getStringArray().length;
		assertEquals(result,0);
	}
	@Test
	public void test5()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","behinded","cause","of","behind","the","big","area","."};
		seperator.setdata(data);
		seperator.seperate();
		prep = seperator.getPrep();
		int result = prep.getStringArray().length;
		assertEquals(result,1);
	}
}
